05. Motors and Sensors

Motors and Sensors

The Jetson TX2 has a large number of interfaces for interacting with peripherals such as sensors and servo-motors. There are Ecosystem Products that are efficient for a full deployment project, but there are also a number of less complex ways to interface with the development kit for experimentation. In addition to simple GPIO digital signals, both I2C busses and USB connections are commonly used.

I2C

I2C stands for Inter-Integrated Circuit, and is a multi-master, multi-slave serial bus protocol invented in 1982 by Philips Semiconductor. The protocol requires no licensing fees and provides a convenient method to address and send data among multiple peripherals and microcontrollers for a board-level system. It can also be used over USB.

I2C pin pairs consist of a data pin (SDA) and a clock pin (SCL). The Jetson TX2 Development board has pinouts on the J21 and J26 expansion headers for four of these ports (0 thru 3) as follows:

Compatible sensors and external controllers can be connected to the I2C bus. This JetsonHacks example uses I2C bus #1 to communicate with an IMU (Inertial Measurement Unit) sensor and control servo-motors.

Installed I2C components can be accessed in user space from the command line or software. Install I2C Linux tools as follows:

$ sudo apt-get install libi2c-dev i2c-tools

Then use i2cdetect from the command line to verify that a device is connected at a particular address.

Simple hobby-type servo-motors may require PWM (pulse-width modulated) signals for control. However, rather than produce those signals directly with the Jetson,an external I2C-addressable controller board is used as an intermediary to produce the signals.

I2C Resources:

USB Sensor and Servo Interfaces

The USB ports on the Development Kit Board can be used for communications with sensors and servo-motors as well. For example, there are many USB3 cameras that can be connected directly to the Jetson Development Kit board USB 3.0. The increased bandwidth of USB 3.0 over USB 2.0 combined with reduced complexity make this a winning combination for many machine vision applications.

USB3 Camera Resources:

External servo-motor controllers are also available for connection through USB without the need to use the I2C ports on the J21 and J26 headers.

USB Controllers Resources:

Which of the following statements about I2C are TRUE? (Check all that apply)

SOLUTION:
  • It is a serial communications protocol.
  • It requires a data line and a clock line.
  • Each component on the bus has its own address